<?php


class Base extends ObjectModule
{
	
	public $tableName = 'connections';

	public $name, $host, $username, $password, $data, $active, $parent, $file, $image;
	
	public $fields = array(
		'name' => array(
			'type' => 'text',
			'required' => true,
		),
		'host' => array(
			'type' => 'text',
			'required' => true,
		),
		'username' => array(
			'type' => 'text',
			'required' => true,
		),
		'password' => array(
			'type' => 'text',
			'required' => true,
		),
		
		
		'data' => array(
			'type' => 'array',
			'fields' => array(
				
				'title' => array(
					'type' => 'text',
				),
				'text' => array(
					'type' => 'textarea',
				),
				'brabus' => array(
					'type' => 'checkbox',
				),
				'textList' => array(
					'type' => 'text',
				),
			),
		),
		
		'active' => array(
			'type' => 'checkbox',
		),
		
		'parent' => array(
			'type' => 'objectList',
			'object' => 'Base',
			'value' => 'name', // var buut arii array //TODO: implement
			'key'	=> 'id',
			'addBlank' => true,
			'rules' => array(
				//TODO: implement
			),
		),
		
		'file' => array(
			'type' => 'file',
			/* TODO: vajag kaut kaa iepiit atljautos formaatus etc */ 
		),
		
		'image' => array(
			'type' => 'file',
			/* TODO: vajag kaut kaa iepiit atljautos formaatus etc */ 
		),
		
		/*
		'data' => array(
			'type' => 'textarea',
		),
		*/
		
	);
	
	
	
	
}



?>